package model;

/**
 * This Class is a type of Arena Action that is sent to the game server and
 * specifies that movement is to occur. That's about it.
 * 
 * @author David's David Shefchik, Xiaotian Chang
 * 
 */
@SuppressWarnings("serial")
public class Movement extends ArmyAction {

	/**
	 * This constructor uses Arena Action's constructor, but is specifically
	 * movement.
	 * 
	 * @param origin
	 *            The territory being moved from.
	 * 
	 * @param destination
	 *            The territory being moved to.
	 * @param num
	 *            the number of troops move from origin to destination.
	 */
	public Movement(Territory origin, Territory destination, Integer num) {
		super(origin, destination);

		if (origin.getTroopNumber() != 0) {
			System.out.println("Fools movin from " + origin.getTerritoryName()
					+ " to " + destination.getTerritoryName());
			origin.removeTroop(num);
			destination.addTroop(num);
		}
	}
}
